package com.gimi.cloud.bbp.client.controller.moreInfo;


import com.gimi.cloud.bbp.client.service.moreInfo.ZmInfoService;
import com.gimi.cloud.bbp.common.enums.ResponseCodeEnum;
import com.gimi.cloud.bbp.common.utils.JsonUtil;
import com.gimi.cloud.bbp.common.utils.reqhead.Response;
import com.gimi.cloud.bbp.common.utils.reqhead.Util;
import com.gimi.cloud.bbp.dto.app.moreInfo.MoreInfoDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * 芝麻信用
 * @auther loongs
 * @date 2018/1/9  10:25
 */
@RestController
@RequestMapping("/moreInfo")
public class ZmInfoController {
    private static Logger logger = LoggerFactory.getLogger(ZmInfoController.class);
    private ZmInfoService zmInfoService;

    @Autowired
    public void setSpeedDataService(ZmInfoService zmInfoService) {
        this.zmInfoService = zmInfoService;
    }

    @RequestMapping(value = "/getZmInfo")
    public void getZmInfo(@RequestBody MoreInfoDTO moreInfoDTO, HttpServletResponse response) throws Exception {
        logger.info("获得芝麻信用评分入参："+moreInfoDTO);
        Response resp= zmInfoService.getZmInfo(moreInfoDTO);
        Util.sendResponse(JsonUtil.toJSONStringWithDateFormatYYYYMMDDHHMMSS(resp), response);
    }

    @RequestMapping(value = "/getSalaryCardInfo")
    public void getSalaryCardInfo(HttpServletResponse response) throws Exception {
        logger.info("获取工资卡信息入参：");
        Response resp = new Response();
        resp.setResponseCode(ResponseCodeEnum.SUCCESSED,"该服务接口暂时未开通！！");
        Util.sendResponse(JsonUtil.toJSONStringWithDateFormatYYYYMMDDHHMMSS(resp), response);
    }

    @RequestMapping(value = "/getCreditCardListInfo")
    public void getCreditCardListInfo(HttpServletResponse response) throws Exception {
        logger.info("获取信用卡流水入参：");
        Response resp = new Response();
        resp.setResponseCode(ResponseCodeEnum.SUCCESSED,"该服务接口暂时未开通！！");
        Util.sendResponse(JsonUtil.toJSONStringWithDateFormatYYYYMMDDHHMMSS(resp), response);
    }

    @RequestMapping(value = "/getCreditCardMailBillInfo")
    public void getCreditCardMailBillInfo(HttpServletResponse response) throws Exception {
        logger.info("获取信用卡邮箱账单入参：");
        Response resp = new Response();
        resp.setResponseCode(ResponseCodeEnum.SUCCESSED,"该服务接口暂时未开通！！");
        Util.sendResponse(JsonUtil.toJSONStringWithDateFormatYYYYMMDDHHMMSS(resp), response);
    }


    @RequestMapping(value = "/getSocialSecurityInfo")
    public void getSocialSecurityInfo(HttpServletResponse response) throws Exception {
        logger.info("获取社保信息入参：");
        Response resp = new Response();
        resp.setResponseCode(ResponseCodeEnum.SUCCESSED,"该服务接口暂时未开通！！");
        Util.sendResponse(JsonUtil.toJSONStringWithDateFormatYYYYMMDDHHMMSS(resp), response);
    }


}
